package PAT;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;

class Site {
    double cost;
    int distance;

    public Site(double cost, int distance) {
        this.cost = cost;
        this.distance = distance;
    }
}

public class PAT1033 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int c = scanner.nextInt();
        int d = scanner.nextInt();
        int ave = scanner.nextInt();
        int n = scanner.nextInt();
        int part = c * ave;
        double ans = 0.0;
        List<Site> sites = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            sites.add(new Site(scanner.nextDouble(), scanner.nextInt()));
        }
        sites.add(new Site(0.0,d));
        sites.sort(new Comparator<>() {
            @Override
            public int compare(Site o1, Site o2) {
                return o1.distance - o2.distance;
            }
        });
        if (sites.get(0).distance != 0) {
            System.out.print("The maximum travel distance = 0.00");
            return;
        }
        int leave = 0;
        for (int i = 0; i < n+1; i++) {
            Site site = sites.get(i);
            int now = site.distance;
            int to = now + part;
            Site tempMin = new Site(1111111.0, 0);
            Site tempSite = null;
            for (int j = i + 1; j < n+1; j++) {
                tempSite = sites.get(j);
                if (tempSite.distance > to) {
                    break;
                }
                if (tempSite.cost < tempMin.cost) {
                    tempMin = tempSite;
                }
            }
            int dis = tempMin.distance - site.distance;
            if (tempMin.cost > site.cost) {
                ans += site.cost * ((int)(dis/ave)-leave);
                leave = 0;
                i = sites.indexOf(tempSite);
            } else {
                ans += site.cost * (c -leave);
                leave = c - dis / ave;
                i = sites.indexOf(tempMin);
            }
        }
        System.out.println(ans);


    }
}
